package org.jeecg.modules.website.controller.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.website.entity.WebSchoolInfo;
import org.jeecg.modules.website.service.IWebSchoolInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* @Description: 校园介绍表
* @Author: jeecg-boot
* @Date:   2024-08-05
* @Version: V1.0
*/
@Api(tags="网站API-学校信息")
@RestController
@RequestMapping("/api/web/webSchoolInfo")
@Slf4j
public class WebSchoolInfoApiController extends JeecgController<WebSchoolInfo, IWebSchoolInfoService> {
   @Autowired
   private IWebSchoolInfoService webSchoolInfoService;



   /**
    * 通过id查询
    *
    * @param id
    * @return
    */
   //@AutoLog(value = "校园介绍表-通过id查询")
   @ApiOperation(value="校园介绍表-通过id查询", notes="校园介绍表-通过id查询")
   @GetMapping(value = "/query")
   public Result<WebSchoolInfo> queryById() {
       WebSchoolInfo webSchoolInfo = webSchoolInfoService.getById(1820391576005689346l);
       if(webSchoolInfo==null) {
           return Result.error("未找到对应数据");
       }
       return Result.OK(webSchoolInfo);
   }

}
